Optimal. Leaf size=144 \[ \frac {2 a (7 A+6 B) \sin (c+d x)}{15 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a B \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}-\frac {4 (7 A+6 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A+6 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{35 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 144, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {3060, 2838,
2830, 2725} \begin {gather*} \frac {2 (7 A+6 B) \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{35 a d}-\frac {4 (7 A+6 B) \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{105 d}+\frac {2 a (7 A+6 B) \sin (c+d x)}{15 d \sqrt {a \cos (c+d x)+a}}+\frac {2 a B \sin (c+d x) \cos ^3(c+d x)}{7 d \sqrt {a \cos (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2725
Rule 2830
Rule 2838
Rule 3060
Rubi steps
\begin {align*} \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx &=\frac {2 a B \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}+\frac {1}{7} (7 A+6 B) \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} \, dx\\ &=\frac {2 a B \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}+\frac {2 (7 A+6 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{35 a d}+\frac {(2 (7 A+6 B)) \int \left (\frac {3 a}{2}-a \cos (c+d x)\right ) \sqrt {a+a \cos (c+d x)} \, dx}{35 a}\\ &=\frac {2 a B \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}-\frac {4 (7 A+6 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A+6 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{35 a d}+\frac {1}{15} (7 A+6 B) \int \sqrt {a+a \cos (c+d x)} \, dx\\ &=\frac {2 a (7 A+6 B) \sin (c+d x)}{15 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a B \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}-\frac {4 (7 A+6 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A+6 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{35 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.39, size = 80, normalized size = 0.56 \begin {gather*} \frac {\sqrt {a (1+\cos (c+d x))} (266 A+228 B+(112 A+141 B) \cos (c+d x)+6 (7 A+6 B) \cos (2 (c+d x))+15 B \cos (3 (c+d x))) \tan \left (\frac {1}{2} (c+d x)\right )}{210 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 102, normalized size = 0.71
method | result | size |
default | \(\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (-120 B \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (84 A +252 B \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-140 A -210 B \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+105 A +105 B \right ) \sqrt {2}}{105 \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}\) | \(102\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.56, size = 118, normalized size = 0.82 \begin {gather*} \frac {14 \, {\left (3 \, \sqrt {2} \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 5 \, \sqrt {2} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 30 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} A \sqrt {a} + 3 \, {\left (5 \, \sqrt {2} \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right ) + 7 \, \sqrt {2} \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 35 \, \sqrt {2} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 105 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} B \sqrt {a}}{420 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 82, normalized size = 0.57 \begin {gather*} \frac {2 \, {\left (15 \, B \cos \left (d x + c\right )^{3} + 3 \, {\left (7 \, A + 6 \, B\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left (7 \, A + 6 \, B\right )} \cos \left (d x + c\right ) + 56 \, A + 48 \, B\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{105 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )} \left (A + B \cos {\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.58, size = 147, normalized size = 1.02 \begin {gather*} \frac {\sqrt {2} {\left (15 \, B \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right ) + 21 \, {\left (2 \, A \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + B \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 35 \, {\left (2 \, A \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 3 \, B \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 105 \, {\left (4 \, A \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 3 \, B \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \sqrt {a}}{420 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\cos \left (c+d\,x\right )}^2\,\left (A+B\,\cos \left (c+d\,x\right )\right )\,\sqrt {a+a\,\cos \left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________